<h1>Listing hotspots</h1>
<% model_class = Hotspot %>
<table  class="table table-striped">
  <thead>
    <tr>
      <th><%= model_class.human_attribute_name(:name) %></th>
      <th><%= model_class.human_attribute_name(:mac) %></th>
      <th><%= model_class.human_attribute_name(:geocode) %></th>
      <th><%= model_class.human_attribute_name(:actions) %></th>
    </tr>
  </thead>

  <tbody>
    <% @hotspots.each do |hotspot| %>
      <tr>
        <td><%= link_to hotspot.name, hotspot %></td>
        <td><%= hotspot.mac %></td>
        <td><%= hotspot.geocode %></td>
        <td>
            <%= link_to btn_icon(:edit), edit_hotspot_path(hotspot) %>
            <%= link_to btn_icon(:trash), hotspot, method: :delete, data: { confirm: 'Are you sure?' } %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>

<%= link_to 'New Hotspot', new_hotspot_path, class: "btn btn-primary btn-mini" %>
